package com.ruoyi.msg.domain.bo;

import com.fasterxml.jackson.annotation.JsonFormat;
import com.ruoyi.common.core.domain.BaseEntity;
import com.ruoyi.common.core.validate.AddGroup;
import com.ruoyi.common.core.validate.EditGroup;
import lombok.Data;
import lombok.EqualsAndHashCode;
import org.springframework.format.annotation.DateTimeFormat;

import javax.validation.constraints.NotBlank;
import javax.validation.constraints.NotNull;
import java.util.Date;

/**
 * 问卷管理业务对象 msg_dcwj_wj
 *
 * @author xiaohao
 * @date 2023-02-02
 */

@Data
@EqualsAndHashCode(callSuper = true)
public class MsgDcwjWjBo extends BaseEntity {

    /**
     * 主键
     */
    @NotNull(message = "主键不能为空", groups = {EditGroup.class})
    private Long id;

    /**
     * 问卷名称
     */
    @NotBlank(message = "问卷名称不能为空", groups = {AddGroup.class, EditGroup.class})
    private String name;

    /**
     * 问卷说明
     */
    @NotBlank(message = "问卷说明不能为空", groups = {AddGroup.class, EditGroup.class})
    private String illustrate;

    /**
     * 答谢语
     */
    @NotBlank(message = "答谢语不能为空", groups = {AddGroup.class, EditGroup.class})
    private String thank;

    /**
     * 开始时间
     */
    @NotNull(message = "开始时间不能为空", groups = {AddGroup.class, EditGroup.class})
    @JsonFormat(timezone = "GMT+8", pattern = "yyyy-MM-dd")
    @DateTimeFormat(pattern = "yyyy-MM-dd")
    private Date startTime;

    /**
     * 结束时间
     */
    @NotNull(message = "结束时间不能为空", groups = {AddGroup.class, EditGroup.class})
    @JsonFormat(timezone = "GMT+8", pattern = "yyyy-MM-dd")
    @DateTimeFormat(pattern = "yyyy-MM-dd")
    private Date endTime;

    /**
     * 总分
     */
    @NotNull(message = "总分不能为空", groups = {AddGroup.class, EditGroup.class})
    private Long score;

    /**
     * 时间限制（秒）
     */
    @NotNull(message = "时间限制（秒）不能为空", groups = {AddGroup.class, EditGroup.class})
    private Integer strict;

    /**
     * 是否启用
     */
    @NotBlank(message = "是否启用不能为空", groups = {AddGroup.class, EditGroup.class})
    private String enabled;


}
